package com.guyaogg.gulimall.search.feign;

import com.guyaogg.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 顾遥
 */
@FeignClient("gulimall-product")
@RequestMapping("product")
public interface ProductFeignService {

    /**
     * 远程获取 attr 属性信息
     * @param attrId
     * @return
     */
    @RequestMapping("/attr/info/{attrId}")
    //@RequiresPermissions("product:attr:info")
    R getAttrInfo(@PathVariable("attrId") Long attrId);

    @RequestMapping("/brand/infos")
    //@RequiresPermissions("product:brand:info")
    R getBrandsInfo(@RequestParam("brandIds") List<Long> brandIds);
}
